var maxAbsoluteSum = function(nums){
    let ans=0,fMax=0,fMin=0;
    for(const x of nums){
        fMax =Math.max(fMax,0)+x
        fMin =Math.min(fMin,0)+x
        ans =Math.max(ans,fMax,-fMin)
    }
    return ans
}